package com.zzyd.factory.account;

import com.zzyd.common.mvp.data.DataSource;
import com.zzyd.common.mvp.presenter.BasePresenter;
import com.zzyd.factory.model.account.User;
import com.zzyd.factory.net.account.AccountDataHelper;

/**
 * @author wjunjie
 * @version 1.0
 * @E-mail wang_junjie007@163.com
 * @company ZZYD
 * @createTime 2018/7/20 15:38
 * @类注释:
 */
public class RegisterPresenter extends BasePresenter<RegisterContract.View> implements RegisterContract.Persenter, DataSource.CallBack<User> {
    public RegisterPresenter(RegisterContract.View view) {
        super(view);
    }

    @Override
    public void register(String phone, String name, String password) {
        start();
        RegisterContract.View view = getView();
        AccountDataHelper.register();

    }


    @Override
    public void onDataLoaded(User user) {
        final RegisterContract.View view = getView();
        if (view == null) {
            return;
        }

    }

    @Override
    public void onDataNotAvailable(final int str) {
        final RegisterContract.View view = getView();
        if (view == null) {
            return;
        }

    }
}
